﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Compiler.TableOfSymbols.Types;

namespace Compiler.Unification.Substitutions
{
    public class SubstitutionItem
    {
        private TypeVariable fromVar;
        private BaseType toType;

        public TypeVariable FromVariable
        { get { return fromVar; } }
        public BaseType ToType
        { get { return toType; } }

        public SubstitutionItem(TypeVariable fromVar, BaseType toType) 
        {
            if (fromVar == null)
                throw new ArgumentNullException("fromVar can not be null");
            if (toType == null)
                throw new ArgumentNullException("toType can not be null");
            this.fromVar = fromVar;
            this.toType = toType;
        }
    }
}
